using System;
using System.Collections.Generic;
using System.Text;

namespace GeneticAlgorithm
{
    /// <summary>
    /// Encapsulates the problem to be solved by genetic algorithm.
    /// </summary>
    /// <typeparam name="TPhenotype"><see>Individual</see></typeparam>
    /// <typeparam name="TOutput"><see>Problem</see></typeparam>
    public abstract class Problem<TPhenotype, TOutput>
    {
        /// <summary>
        /// Feed the solution represented by the individual to the problem,
        /// and calculate the raw output.
        /// </summary>
        /// <param name="solution">individual's phenotype</param>
        /// <returns>some raw output</returns>
        public abstract TOutput Evaluate(TPhenotype solution);
    }
}
